package com.epam.necklace.view.menu.mainmenu.submenu.submenustones;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;

import com.epam.necklace.view.menu.Menu;
import com.epam.necklace.view.menu.MenuItem;
import com.epam.necklace.view.menu.mainmenu.submenu.BackMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenustones.rank2menu.AgateMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenustones.rank2menu.GagatMenu;
import com.epam.necklace.view.menu.mainmenu.submenu.submenustones.rank2menu.SardMenu;

public class Rank2 extends MenuItem {
	private static final Logger log = Logger.getLogger(Rank2.class);
	private final Menu subMenu;
	private static final List<MenuItem> items;

	static {
		items = new ArrayList<MenuItem>();
		items.add(new AgateMenu());
		items.add(new GagatMenu());
		items.add(new SardMenu());
		items.add(new BackMenu());
	}

	public Rank2() {
		super("Second-rank", "2");
		subMenu = new Menu(items);
	}

	@Override
	public boolean execute() {
		log.info("second-rank comand");
		subMenu.run();
		return true;
	}

}
